﻿// See https://aka.ms/new-console-template for more information
using System.Diagnostics;

internal class Program
{
    public static Person person = new Person();
    static void Main(string[] args)
    {
        Task.Run(() => {
            lock (person)
            {

                Console.WriteLine($"{Environment.CurrentManagedThreadId} 进入person lock");
                Debugger.Break();
            }


        });
        Task.Run(() => {
            lock (person)
            {

                Console.WriteLine($"{Environment.CurrentManagedThreadId} 进入person2 lock");
                Debugger.Break();
            }


        });
        Console.ReadLine();
    }
}
public class Person { }